//
//  API.h
//  Alayicai
//
//  Created by ibokan on 15/7/3.
//  Copyright (c) 2015年 FiM. All rights reserved.
//
//预编译，只有OC语言才加载
#ifdef __OJBC__

#endif
#import <Foundation/Foundation.h>


@interface API : NSObject
//对外用于获取单例对象的公共访问接口
+(id)getObject;

#pragma mark AFNetworking框架
//请求数据
+(void)netAccess:(NSString *) url
       andMethor:(NSString *) methor
         andDict:(NSDictionary*) dict
         success:(void(^)(NSDictionary *successCode)) mysuccess
          falure:(void(^)(NSError * er)) myfalure;
+(void)netAccess1:(NSString *) url
       andMethor:(NSString *) methor
         andDict:(NSDictionary*) dict
         success:(void(^)(NSDictionary *successCode)) mysuccess
          falure:(void(^)(NSError * er)) myfalure;


/**
 拼接 key get 方法

 @param url <#url description#>
 @param params <#params description#>
 @param mysuccess <#mysuccess description#>
 @param myfalure <#myfalure description#>
 */
+(void)requestAppendKey:(NSString *)url params:(NSDictionary *)params success:(void(^)(NSDictionary *successCode)) mysuccess falure:(void(^)(NSError * er)) myfalure;

/**
 拼接 key get 方法


 @param url <#url description#>
 @param params <#params description#>
 @param mysuccess <#mysuccess description#>
 @param netImage <#netImage description#>
 @param url <#url description#>
 @param data <#data description#>
 @param mysuccess <#mysuccess description#>
 @param myfalure <#myfalure description#>
 */
+(void)requestPostAppendKey:(NSString *)url params:(NSDictionary *)params success:(void(^)(NSDictionary *successCode)) mysuccess falure:(void(^)(NSError * er)) myfalure;

//上传图片
+(void)netImage:(NSString *) url
        andData:(NSData*) data
      imageName:(NSString *)imageKey
        success:(void(^)(NSDictionary *successCode)) mysuccess
         falure:(void(^)(NSError * er)) myfalure;
//停止一切请求
+(void)stopRequester;


@end
